diff options
Diffstat (limited to 'glucometerutils/common.py')
-rw-r--r-- | glucometerutils/common.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glucometerutils/common.py b/glucometerutils/common.py index a9968c2..32402a6 100644 --- a/glucometerutils/common.py +++ b/glucometerutils/common.py @@ -16,6 +16,11 @@ UNIT_MMOLL = 'mmol/L' VALID_UNITS = [UNIT_MGDL, UNIT_MMOLL] +# Constants for meal information +NO_MEAL = '' +BEFORE_MEAL = 'Before Meal' +AFTER_MEAL = 'After Meal' + # Constants for date format DATETIME_12HR = '12 hours' DATETIME_24HR = '24 hours' @@ -54,7 +59,7 @@ _ReadingBase = collections.namedtuple( '_ReadingBase', ['timestamp', 'value', 'meal', 'comment']) class Reading(_ReadingBase): - def __new__(cls, timestamp, value, meal='', comment=''): + def __new__(cls, timestamp, value, meal=NO_MEAL, comment=''): """Constructor for the reading object. Args: |